home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1995 November / Macworld Nov ’95.toast / Developers / BoxMaker++ / µZak ƒ / µZakshell.h < prev    next >
Encoding:
Text File  |  1995-06-14  |  1.5 KB  |  81 lines  |  [TEXT/KAHL]

  1.  
  2. enum
  3. {
  4.     iShowPreferences = 1,
  5.     iHideOnLaunch,
  6.     iNeither,
  7.     iRequeue,
  8.     iShuffle,
  9.     iVolume,
  10.     iCancelCurrent,
  11.     iCancelQueue,
  12.     iNameOfFile,
  13.     iQueueLength
  14. };
  15.  
  16. typedef enum soundVolume
  17. {
  18.     VolumeSoftest = 1,
  19.     VolumeSofter,
  20.     VolumeSoft,
  21.     VolumeNormal,
  22.     VolumeLoud,
  23.     VolumeLouder,
  24.     VolumeLoudest,
  25.     numVolumes
  26. } soundVolume;
  27.  
  28. const short *theVolumes = (short *)*Get1Resource( 'VOLs', 130);
  29.  
  30. class muZaksettings
  31. {
  32.     public:
  33.         short wie_van_de_drie;
  34.         Boolean requeue_after_playing;
  35.         Boolean shuffle;
  36.         soundVolume volume;
  37. };
  38.  
  39. typedef preferences<muZaksettings> muZakPrefs;
  40.  
  41. #pragma template preferences<muZaksettings>;
  42.  
  43. typedef queue<AliasHandle> alias_queue;
  44.  
  45. #pragma template queue<AliasHandle>;
  46.  
  47. class muZakshell : public boxmaker, public muZakPrefs, public alias_queue
  48. {
  49.     public:
  50.         muZakshell( Str255 prefsFileName,
  51.             muZaksettings &defaultsettings, unsigned long queueLength);
  52.         ~muZakshell();
  53.  
  54.     protected:
  55.         virtual void OpenDoc( Boolean opening);
  56.         virtual void OpenApp() {};    // do not show preferences on OAPP
  57.         virtual void HandleDialogEvent( short itemHit, DialogPtr theDialog);
  58.         //
  59.         // for added speed we return false from 'mayEnterFolder' when the
  60.         // queue is full.
  61.         //
  62.         virtual Boolean mayEnterFolder( Boolean opening);
  63.  
  64.         virtual Boolean EventloopHook();
  65.  
  66.         void StartAMovie();
  67.         void StopCurrentMovie( Boolean dispose_of_alias = true);
  68.         void SetButtons();
  69.         void SetRequeueButton();
  70.         void SetShuffleButton();
  71.         void SetVolumePopup();
  72.  
  73.         void updateName( Str63 theName);
  74.         void updateNumber();
  75.         
  76.     private:
  77.         Movie theMovie;
  78.         short theMovieFile;
  79.         AliasHandle theAlias;
  80. };
  81.